package com.ruoyi.tplus.mapper;

import com.ruoyi.tplus.domain.*;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface ITPlusMapper {

    /**
     * T+数据库：销货单：查询是否存在
     * @param tPlusXhd
     * @return
     */
    TPlusXhd queryXhdCode(TPlusXhd tPlusXhd);

    TPlusXhd updateXhd(TPlusXhd tPlusXhd);

    TPlusXhdS updateXhdS(TPlusXhdS tPlusXhdS);

    int insertXhd(TPlusXhd tPlusXhd);

    int insertXhdS(TPlusXhdS tPlusXhdS);

    AA_Inventory queryInventoryIdByCode(TPlusXhdS tPlusXhdS);
    AA_Inventory queryInventoryIdByName(String detailsinventoryname);

    AA_Unit queryAA_UnitIdByCode(TPlusXhdS tPlusXhdS);

    TPlus_Jhd queryJhdCode(TPlus_Jhd tPlusJhd);

    int insertJhd(TPlus_Jhd tPlusJhd);
    int insertJhdS(TPlus_JhdS tPlusJhdS);

    AA_Unit queryAA_UnitIdByName(String detailsUnitName);


    AA_Partner queryPartnerIdByName(String  partnername);

    /**
     * 根据仓库名称查询id
     * @param detailsWarehouseName
     * @return
     */
    AA_Warehouse queryAA_WarehouseIdByName(String detailsWarehouseName);
    AA_Warehouse queryAA_WarehouseIdByCode(String warehouseCode);

    /**
     * 根据部门名称查询id
     * @return
     */
    AA_Department queryAA_DepartmentIdByName(String departmentName);

    int insertClckd(ST_RDRecord stRdRecord);

    int insertClckdS(ST_RDRecord_b stRdRecordB);

    int queryClckdCode(ST_RDRecord stRdRecord);
    //收款单、付款单
    int insertReceiptAndPayment(ARAP_ReceivePayment receivePayment);
    //收款单、付款单把子表
    int insertReceiptAndPaymentS(ARAP_ReceivePayment_MultiSettle receivePaymentS);

    ARAP_ReceivePayment queryReceiptAndPaymentCode(String code);

    AA_Person queryAA_personIdByName(Object name);

    AA_SettleStyle queryAA_SettleStyleIdByName(String namesettlestyle);

    AA_BankAccount queryAA_BankAccountIdByName(String namebankaccount);
}
